package com.hc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hc.domain.BlogCategory;
import com.hc.vo.BlogCategoryVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 博客类别
 *
 * @author 梁云亮
 */
@Mapper
public interface BlogCategoryMapper extends BaseMapper<BlogCategory> {

    /**
     * 批量插入博客类别
     *
     * @param blogCategoryVOList
     * @return
     */
    int batchInsertBlogCategory(@Param("blogCategoryVOList") List<BlogCategoryVO> blogCategoryVOList);


    /**
     * 批量删除博客类别
     *
     * @param blogIds
     * @return
     */
    int batchDeleteBlogCategoryById(@Param("blogIds") List<Integer> blogIds);

    /**
     * 根据id删除博客类别
     *
     * @param id 博客类别编号
     * @return
     */
    @Delete("DELETE  FROM tb_blog_category WHERE id = #{id} ")
    int deleteBlogCategoryById(@Param("id") Integer id);
}
